package pattern8.stock;

/**
 * 基金
 * 管理所有的股票，进行组合投资
 * @author wdl
 */
public class Found {
    private Stock1 stock1;
    private Stock2 stock2;
    private Stock3 stock3;
    /**
     * 基金管理股票
     */
    public Found(){
        stock1=new Stock1();
        stock2=new Stock2();
        stock3=new Stock3();
    }

    /**
     * 股民买基金
     */
    public void buyFound(){
        stock1.buy();
        stock2.buy();
        stock3.buy();
    }

    /**
     * 股民卖基金
     */
    public void sellFound(){
        stock1.sell();
        stock2.sell();
        stock3.sell();
    }
}
